package test_2_27;

import java.util.Scanner;

class users
{
    String name;
    int id;
    String adderss;
    double cunkuan;

    public users(String name, int id, String adderss, double cunkuan) {
        this.name = name;
        this.id = id;
        this.adderss = adderss;
        this.cunkuan = cunkuan;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAdderss() {
        return adderss;
    }

    public void setAdderss(String adderss) {
        this.adderss = adderss;
    }

    public double getCunkuan() {
        return cunkuan;
    }

    public void setCunkuan(double cunkuan) {
        this.cunkuan = cunkuan;
    }
}
public class two {
    public static void main(String[] args) {
        int min_money=10;
        users u=new users("陈圆",12345,"陕西省",1000);
        System.out.println("请输入要存款的金额：");
        Scanner sc=new Scanner(System.in);
        double c=sc.nextDouble();
        u.cunkuan=input_money(u.cunkuan,c);
        System.out.println(u.cunkuan);
        System.out.println("请输入要取款的金额：");
        double d= sc.nextDouble();
        u.cunkuan=output_money(u.cunkuan,d);

    }
    public static double input_money(double a,double b)
    {
        return a+b;
    }
    public static double output_money(double a,double b)
    {
        if(a<10)
        {
            System.out.println("取不出来");
            return a;
        }
        return a-b;
    }

}
